import Vue from 'vue'
import VueRouter from 'vue-router'
import AppHome from '../views/AppHome.vue'
// import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    component:AppHome,
    children:[
      {
        path: '',
        name: 'home',
        component:()=> import('../views/HomeView.vue')
      },
      {
        path: 'category',
        name: 'category',
        component: () => import(/* webpackChunkName: "about" */ '../views/CategoryView.vue')
      },
      {
        path: 'eat',
        name: 'eat',
        component: () => import(/* webpackChunkName: "about" */ '../views/EatNothingView.vue')
      },
      {
        path: 'shopping',
        name: 'shopping',
        component: () => import(/* webpackChunkName: "about" */ '../views/ShoppingCarView.vue')
      },
      {
        path: 'mine',
        name: 'mine',
        component: () => import(/* webpackChunkName: "about" */ '../views/MineView.vue')
      },
    ]
  },
  {
    path: '/login',
    name:"login",
    component: () => import(/* webpackChunkName: "about" */ '../views/LoginView.vue')
  },{
    path:'/DetailPage',
    name:'DetailPage',
    component: () => import('../views/DetailPage.vue')
  }
]
const router = new VueRouter({
  routes,
})

export default router
